<?php

/**
 * Description of EmailHeaderFooterForm
\* www.teuker.nl - mail@teuker.nl
 * 
 * @author francisc
 */

class EmailHeaderFooterForm extends sfForm {

    public function configure() {
        $this->setWidgets(array(
            'header' => new sfWidgetFormTextarea(),
            'footer' => new sfWidgetFormTextarea()
        ));

        $this->setValidators(array(
            'header' => new sfValidatorString(array('min_length' => 0, 'max_length' => 7000, 'required' => true)),
            'footer' => new sfValidatorString(array('min_length' => 0, 'max_length' => 7000, 'required' => true)),
        ));

        $this->widgetSchema->setNameFormat('email_message[%s]');
    }
}